import { defineStore } from 'pinia'
import { routesToMenuTree } from '@/utils'
import { faultDataList, electDataList } from '@/utils/faultDataList'

export const menuInfoSubStore = defineStore({
    id: 'faultDataList',
    state: () => {
        return {
            faultList: faultDataList, // 故障设置菜单列表
            electricList: electDataList, //电能表菜单
            // 当前选中的菜单
            activeMenuItem: 1,
            activeElectItem: 1,
        }
    },

    getters: {},
    actions: {
        setActiveMenuItem(data) {},
    },
    persist: {
        enabled: true,
        // keys: ['menuList, activeMenuItem'],
        encryptionKey: 'faultDataList',
        strategies: [{
            key: 'faultDataList',
            storage: sessionStorage,
        }, ],
    },
})